#include "RandomDistribution.h"

RandomDistribution::RandomDistribution() :
        randomNumberGenerator(gsl_rng_alloc(gsl_rng_ranlxd2))
{
}

RandomDistribution::~RandomDistribution()
{
    gsl_rng_free(randomNumberGenerator);
}

double RandomDistribution::getRandomUniform(double start, double end)
{
    return gsl_ran_flat(randomNumberGenerator, start, end);
}

double RandomDistribution::getRandomNormal(double mean, double sigma)
{
    return mean + gsl_ran_gaussian(randomNumberGenerator, sigma);
}
